import os
import json

with open("/home/yanlq/zjut_mindvideo/mindvideo/datasets/kinetic400/classes.json", 'r') as rf:
    cls_dict = json.loads(rf.read())
    with open("/home/yanlq/zjut_mindvideo/mindvideo/datasets/kinetic400/classes.txt", 'w') as wf:
        for i, cls in enumerate(cls_dict):
            wf.write("{} {}\n".format(i, cls))